package com.example.fw;

public class Folder implements Comparable<Folder>{
	private String name;

	public Folder() {
	}
	
	public Folder(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "Folder [name=" + name + "]";
	}

	@Override
	public int hashCode() {
		int result = 1;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Folder other = (Folder) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}

	@Override
	public int compareTo(Folder other) {
		return this.name.toLowerCase().compareTo(other.name.toLowerCase());
	}
	
	
//---------------------------------------------------------------------------------------------------
//getters  and setters (with)
//---------------------------------------------------------------------------------------------------
	public Folder withName(String name) {
		this.name = name;
		return this;
	}

	public String getName() {
		return name;
	}
}